#ifndef __UDP_H__
#define __UDP_H__

#include <arpa/inet.h>
#include <netinet/in.h>
#include<stdio.h>
#include"list.h"


int Udp_Inti(void);
int Send_Onlinelist(c_list head_connected,int fd_socket,int port,char*ip);
int Send_Reply(char*msg,int fd_socket,int port,char*ip);
int Asking_chat(c_list head_connected,c_list head_chating,int fd_socket,char *msg_recv,char *srcip,int srcport);
int Udp_Dataswap(c_list head_chating,int fd_socket,char * msg_recv,int srcport,char * srcip);
int Send_Broadcast(c_list head_connected,int fd_socket,char *msg_recv);
int group_add(c_list head_group,char* msg_recv,char*srcip,int srcport);
int Send2_group(int fd_socket,char *msg_recv,c_list head_group);
int Udp_detialswap(c_list head_chating,int fd_socket,char * msg_recv,int srcport,char * srcip);
#define PROT 65001
#define MSG_LEN 1024

#endif